//YYYY-MM-DD HH:mm:ss
const ShowMapList: any = {
  // ['10' || '11' || '12' || '13']: {
  //   label: '',
  //   type: 'input',
  //   props: {
  //     type: 'text',
  //     placeholder: '请输入',
  //   },
  //   colProps: {
  //     md: 6
  //   }
  // },

  "15": {
    label: "",
    type: "date",
    props: {
      placeholder: "请选择",
      type: "time",
    },
    colProps: {
      md: 6,
    },
  },
  "20": {
    label: "",
    type: "date",
    props: {
      placeholder: "请选择",
      type: "date",
    },
    colProps: {
      md: 6,
    },
  },
  "21": {
    label: "",
    type: "date",
    props: {
      placeholder: "请选择",
      type: "datetime",
    },
    colProps: {
      md: 6,
    },
  },
  "30": {
    label: "",
    type: "checkbox",
    props: {
      placeholder: "请选择",
      // options: [
      //   {
      //     value: true,
      //     skin: "primary",
      //   },
      // ],
    },
    // lay-checkbox组件  type=30时 渲染一个checkbox是否选中传递true false的查询参数值
    slots: {
      customRender: "customCheckbox",
    },
    colProps: {
      md: 6,
    },
  },
  "31": {
    label: "",
    type: "checkbox",
    props: {
      placeholder: "请选择",
    },
    required: true,
    slots: {
      customRender: "customCheckbox",
    },
    colProps: {
      md: 6,
    },
  },
  "40": {
    label: "",
    type: "input",
    props: {
      placeholder: "请输入",
      type: "number",
    },
    colProps: {
      md: 6,
    },
  },
  "41": {
    label: "",
    type: "date",
    props: {
      placeholder: "请选择",
      type: "year",
    },
    colProps: {
      md: 6,
    },
  },
  "42": {
    label: "",
    type: "date",
    props: {
      placeholder: "请选择",
      type: "yearmonth",
      format: "YYYY-MM",
    },
    colProps: {
      md: 6,
    },
  },
  "50": {
    label: "",
    type: "input",
    props: {
      placeholder: "请输入",
      type: "number",
    },
    colProps: {
      md: 6,
    },
  },
  "60": {
    label: "",
    type: "select",
    props: {
      placeholder: "请选择",
      options: [],
    },
    colProps: {
      md: 6,
    },
  },
  "61": {
    label: "",
    type: "cascader",
    props: {
      options: [],
    },
    slots: {
      placeholder: "请选择",
      customRender: "submit",
    },
    colProps: {
      md: 6,
    },
  },
  "62": {
    label: "",
    type: "radio",
    props: {
      placeholder: "请选择",
      options: [],
    },
    colProps: {
      md: 6,
    },
  },
  "70": {
    label: "",
    type: "select",
    props: {
      placeholder: "请选择",
      options: [],
    },
    colProps: {
      md: 6,
    },
  },
  "101": {
    label: "",
    type: "select",
    props: {
      placeholder: "请选择",
      options: [],
    },
    colProps: {
      md: 6,
    },
  },

  "90": "image",
} as const;
["10", "11", "12", "13"].forEach((key) => {
  ShowMapList[key] = {
    label: "",
    type: "input",
    props: {
      type: "text",
      placeholder: "请输入",
    },
    colProps: {
      md: 6,
    },
  };
});
//"40", "50",暂时使用input type="number"
["71", "104"].forEach((key) => {
  ShowMapList[key] = {
    label: "",
    props: {
      customRender: "",
    },
    colProps: {
      md: 6,
    },
  };
});
//自定义组件

export type ShowMapType = typeof ShowMapList;

export const ShowMap = new Map();

for (const key in ShowMapList) {
  if (Object.prototype.hasOwnProperty.call(ShowMapList, key)) {
    const element = ShowMapList[key];
    ShowMap.set(key, element);
  }
}
